import request from '@/utils/request'
// 获取员工的简单列表
export const getEmployeeSimple = () => request.get('/sys/user/simple')
// 获取员工信息
export const getEmployeeList = (params) => request({
  url: '/sys/user',
  method: 'GET',
  params
})
// 删除员工信息
export const delUser = id => request({
  url: `/sys/user/${id}`,
  method: 'DELETE'
})
// 添加员工信息
export const addUserInfo = data => request({
  method: 'post',
  url: '/sys/user',
  data
})
// 批量导入员工
export const batchUser = data => request({
  url: '/sys/user/batch',
  method: 'POST',
  data
})
// 更新员工信息详情
export const saveUserDetail = data => request({
  url: `/sys/user/${data.id}`,
  method: 'put',
  data
})
export const userInfoById = id => request({
  url: `/sys/user/${id}`,
  method: 'GET'
})
export const setUserRole = data => request({
  url: '/sys/user/assignRoles',
  method: 'put',
  data
})
